<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>访问时间限制</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            color: #fff;
            overflow: hidden;
            padding: 20px;
        }

        .container {
            background: rgba(25, 25, 45, 0.8);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
            width: 90%;
            max-width: 800px;
            padding: 40px;
            text-align: center;
            position: relative;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.1);
            z-index: 10;
        }

        /* 装饰元素 */
        .decoration {
            position: absolute;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 50%;
            z-index: -1;
        }

        .dec-1 {
            width: 300px;
            height: 300px;
            top: -150px;
            right: -100px;
        }

        .dec-2 {
            width: 200px;
            height: 200px;
            bottom: -100px;
            left: -50px;
        }

        /* 标题样式 */
        .error-icon {
            font-size: 80px;
            color: #e94560;
            margin-bottom: 20px;
            animation: pulse 2s infinite;
        }

        h1 {
            font-size: 2.8rem;
            margin-bottom: 15px;
            color: #fff;
            text-shadow: 0 0 10px rgba(233, 69, 96, 0.5);
        }

        .subtitle {
            font-size: 1.5rem;
            color: #a9a9c5;
            margin-bottom: 40px;
        }

        /* 时间显示 */
        .time-container {
            background: rgba(15, 52, 96, 0.5);
            border-radius: 15px;
            padding: 30px;
            margin: 40px 0;
            border: 1px solid rgba(255, 255, 255, 0.1);
            position: relative;
        }

        .current-time {
            font-size: 4rem;
            font-weight: 700;
            letter-spacing: 3px;
            margin: 10px 0;
            color: #4cc9f0;
            text-shadow: 0 0 15px rgba(76, 201, 240, 0.7);
        }

        .current-date {
            font-size: 1.3rem;
            color: #a9a9c5;
            margin-bottom: 30px;
        }

        .access-time {
            background: rgba(233, 69, 96, 0.15);
            border-radius: 10px;
            padding: 20px;
            margin: 30px 0;
            border-left: 4px solid #e94560;
        }

        .access-time h2 {
            color: #e94560;
            margin-bottom: 15px;
            font-size: 1.8rem;
        }

        .time-slots {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 20px;
            margin-top: 20px;
        }

        .time-slot {
            background: rgba(25, 130, 196, 0.2);
            padding: 15px 25px;
            border-radius: 10px;
            font-size: 1.2rem;
            border: 1px solid rgba(76, 201, 240, 0.3);
        }

        .time-slot i {
            margin-right: 10px;
            color: #4cc9f0;
        }

        /* 按钮样式 */
        .btn {
            background: linear-gradient(45deg, #e94560, #d1284a);
            color: white;
            border: none;
            padding: 15px 40px;
            font-size: 1.2rem;
            border-radius: 50px;
            cursor: pointer;
            margin: 20px 10px;
            transition: all 0.3s ease;
            box-shadow: 0 5px 15px rgba(233, 69, 96, 0.4);
        }

        .btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(233, 69, 96, 0.6);
        }

        .btn-outline {
            background: transparent;
            border: 2px solid #4cc9f0;
            color: #4cc9f0;
            box-shadow: 0 5px 15px rgba(76, 201, 240, 0.3);
        }

        .btn-outline:hover {
            background: rgba(76, 201, 240, 0.1);
        }

        /* 页脚 */
        footer {
            margin-top: 40px;
            color: #6c757d;
            font-size: 0.9rem;
        }

        /* 动画效果 */
        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.1); }
            100% { transform: scale(1); }
        }

        @keyframes float {
            0% { transform: translateY(0px); }
            50% { transform: translateY(-15px); }
            100% { transform: translateY(0px); }
        }

        .floating {
            animation: float 4s ease-in-out infinite;
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .container {
                padding: 30px 20px;
            }

            h1 {
                font-size: 2.2rem;
            }

            .subtitle {
                font-size: 1.2rem;
            }

            .current-time {
                font-size: 3rem;
            }

            .time-slots {
                flex-direction: column;
                align-items: center;
            }
        }

        @media (max-width: 480px) {
            h1 {
                font-size: 1.8rem;
            }

            .current-time {
                font-size: 2.5rem;
            }

            .time-slot {
                width: 100%;
            }
        }
    </style>
</head>
<body>
<div class="decoration dec-1"></div>
<div class="decoration dec-2"></div>

<div class="container floating">
    <div class="error-icon">
        <i class="fas fa-clock"></i>
    </div>

    <h1>不在访问时间</h1>
    <p class="subtitle">您当前尝试访问的时间不在允许范围内</p>

    <div class="time-container">
        <p>当前时间</p>
        <div class="current-time" id="current-time">00:00:00</div>
        <div class="current-date" id="current-date">2023年1月1日 星期一</div>
    </div>

    <div class="access-time">
        <h2><i class="fas fa-calendar-alt"></i> 允许访问时间</h2>
        <p>本系统仅在工作日的以下时间段开放访问：</p>

        <div class="time-slots">
            <div class="time-slot">
                <i class="fas fa-sun"></i> 上午时段: 09:00 - 12:00
            </div>
            <div class="time-slot">
                <i class="fas fa-cloud-sun"></i> 下午时段: 13:30 - 18:00
            </div>
        </div>
    </div>

    <div class="action-buttons">
        <button class="btn" onclick="location.reload()">
            <i class="fas fa-sync-alt"></i> 重新检查时间
        </button>
        <button class="btn btn-outline" onclick="window.location.href='/'">
            <i class="fas fa-home"></i> 返回首页
        </button>
    </div>

    <footer>
        <p>如需在非工作时间访问，请联系系统管理员 | support@example.com</p>
    </footer>
</div>

<script>
    // 更新时间显示
    function updateTime() {
        const now = new Date();

        // 格式化时间
        const timeString = now.toLocaleTimeString('zh-CN', {
            hour: '2-digit',
            minute: '2-digit',
            second: '2-digit',
            hour12: false
        });

        // 格式化日期
        const dateOptions = {
            year: 'numeric',
            month: 'long',
            day: 'numeric',
            weekday: 'long'
        };
        const dateString = now.toLocaleDateString('zh-CN', dateOptions);

        // 更新DOM元素
        document.getElementById('current-time').textContent = timeString;
        document.getElementById('current-date').textContent = dateString;
    }

    // 初始调用并设置定时器
    updateTime();
    setInterval(updateTime, 1000);

    // 添加动态装饰元素
    function createDecorations() {
        const body = document.querySelector('body');
        const colors = ['rgba(76, 201, 240, 0.1)', 'rgba(233, 69, 96, 0.1)', 'rgba(41, 128, 185, 0.1)'];

        for (let i = 0; i < 8; i++) {
            const dec = document.createElement('div');
            dec.classList.add('decoration');

            // 随机大小
            const size = Math.random() * 100 + 50;
            dec.style.width = `${size}px`;
            dec.style.height = `${size}px`;

            // 随机位置
            dec.style.top = `${Math.random() * 100}%`;
            dec.style.left = `${Math.random() * 100}%`;

            // 随机颜色
            dec.style.background = colors[Math.floor(Math.random() * colors.length)];

            // 随机动画
            dec.style.animation = `float ${Math.random() * 10 + 10}s ease-in-out infinite`;
            dec.style.animationDelay = `${Math.random() * 5}s`;

            body.appendChild(dec);
        }
    }

    // 页面加载完成后创建装饰
    window.addEventListener('load', createDecorations);
</script>
</body>
</html>